// Copyright  2004-2008 Backplane Ltd.
//
// This file is part of Ubiquity formsPlayer
//
// Ubiquity formsPlayer is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3 of the License, or (at your
// option) any later version.
//
// Ubiquity formsPlayer is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.
//
// You should have received a copy of the GNU General Public License
// along with Ubiquity formsPlayer If not, see <http://www.gnu.org/licenses/>.
//	
//
//   Purpose: declaration of UI Event Interfaces.
//   $Id$


#ifndef __IUIEvents_H
#define __IUIEvents_H
/*
struct IUIEvents
{
	//Corresponds to a form control.
public:
	//Events fired by node bindings.
	virtual HRESULT onvalid() = 0;
	virtual HRESULT oninvalid() = 0;
	
	virtual HRESULT onreadwrite() = 0;
	virtual HRESULT onreadonly() = 0;

	virtual HRESULT onrequired() = 0;
	virtual HRESULT onoptional() = 0;

	virtual HRESULT ondisabled() = 0;
	virtual HRESULT onenabled() = 0;

	virtual HRESULT onvaluechanged() = 0;

	//Events fired by UI interaction.
	virtual HRESULT onnext() = 0;
	virtual HRESULT onprevious() = 0;
	
	virtual HRESULT onDOMFocusIn() = 0;
	virtual HRESULT onDOMFocusOut() = 0;

	virtual HRESULT onInRange() = 0;
	virtual HRESULT onOutOfRange() = 0;

	virtual HRESULT onDOMActivate() = 0;

	virtual HRESULT onhelp() = 0;
	virtual HRESULT onhint() = 0;

};


struct IUIModelEvents
{
	//Corresponds to a model.
public:
	//Construction/destruction events.
	virtual HRESULT onModelConstruct () = 0;
	virtual HRESULT onModelConstructDone () = 0;
	virtual HRESULT onReady () = 0;
	virtual HRESULT onModelDestruct () = 0;

	//errors
	virtual HRESULT onBindingException () = 0;
	virtual HRESULT onLinkError() = 0;
	virtual HRESULT onLinkException() = 0;
	virtual HRESULT onComputeException() = 0;

	//These are actually targeted at instance
	//	but instance does not have a viewlink.
	virtual HRESULT onInsert() = 0;
	virtual HRESULT onDelete() = 0;

	//re... events

	virtual HRESULT onRebuild() = 0;
	virtual HRESULT onRecalculate() = 0;
	virtual HRESULT onRevalidate() = 0;
	virtual HRESULT onRefresh() = 0;
	virtual HRESULT onReset() = 0;
};

struct IUIRepeatEvents
{
public:
	//A repeat is not a form control.
	virtual HRESULT onScrollFirst() = 0;
	virtual HRESULT onScrollLast() = 0;
};


struct IUISubmissionEvents
{
public:
	//A repeat is not a form control.
	virtual HRESULT onSubmit() = 0;
	virtual HRESULT onSubmitDone() = 0;
	virtual HRESULT onSubmitError(BSTR sURL, BSTR Reason) = 0;
};
*/
#endif